package asteroids.model.programs.types;

import asteroids.model.Ship;
import asteroids.model.programs.expressions.DoubleLiteral;
import asteroids.model.programs.expressions.ExprDoubleEvaluator;
import asteroids.model.programs.expressions.Expression;

public class DoubleType extends Type {

	public DoubleType() {
	
	}
	
	@Override
	public Expression getLiteral(Expression e, Ship s) {
		ExprDoubleEvaluator ede = new ExprDoubleEvaluator(s);
		double d = e.accept(ede);
		return new DoubleLiteral(e.getLine(), e.getColumn(), d);
	}

}
